// components/popup/popup.js
Component({
	options: {
		addGlobalClass: true,
	},
	externalClasses: ['popup-class', 'content-class'],
	/**
	 * 组件的属性列表
	 */
	properties: {
		value: {
			type: Boolean,
			value: false,
		},
		top: {
			type: Boolean,
			value: false,
		},
		bottom: {
			type: Boolean,
			value: false,
		},
	},

	/**
	 * 组件的初始数据
	 */
	data: {animationData:{}},

	ready() {},

	/**
	 * 组件的方法列表
	 */
	methods: {
		tapThis() {
			let show = !this.data.value
			if (show) {
				return
			}
			// var animation = wx.createAnimation({
			// 	duration: this.data.top || this.data.bottom?450:200,
			// 	timingFunction: 'ease',
			// })
			// animation.opacity(show?1:0)
			// this.setData({
			// 	animationData:animation.export()
			// })
			this.setData({
				value: show,
			})
			this.triggerEvent('show', show)
		},
		tapThisStop() {},
	},
})
